var url = 'https://www.baidu.com?key=hello&name=张三&num=123';
console.log(url);

var code = escape(url);
console.log(code);
var str = unescape(code);
console.log(str);

var code2 = encodeURI(url);
console.log(code2);
var str2 = decodeURI(code2);
console.log(str2);

var code3 = encodeURIComponent(url);
console.log(code3);
var str3 = decodeURIComponent(code3);
console.log(str3);
